/**
 * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package fr.smile.liferay.portlet.news.service.persistence;

import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.service.ServiceContext;

import fr.smile.liferay.portlet.news.model.NewsEntry;

import java.util.List;

/**
 * The persistence utility for the news entry service. This utility wraps {@link NewsEntryPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
 *
 * <p>
 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
 * </p>
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author Brian Wing Shun Chan
 * @see NewsEntryPersistence
 * @see NewsEntryPersistenceImpl
 * @generated
 */
public class NewsEntryUtil {
	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
	 */
	public static void clearCache() {
		getPersistence().clearCache();
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
	 */
	public static void clearCache(NewsEntry newsEntry) {
		getPersistence().clearCache(newsEntry);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
	 */
	public long countWithDynamicQuery(DynamicQuery dynamicQuery)
		throws SystemException {
		return getPersistence().countWithDynamicQuery(dynamicQuery);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
	 */
	public static List<NewsEntry> findWithDynamicQuery(
		DynamicQuery dynamicQuery) throws SystemException {
		return getPersistence().findWithDynamicQuery(dynamicQuery);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
	 */
	public static List<NewsEntry> findWithDynamicQuery(
		DynamicQuery dynamicQuery, int start, int end)
		throws SystemException {
		return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
	 */
	public static List<NewsEntry> findWithDynamicQuery(
		DynamicQuery dynamicQuery, int start, int end,
		OrderByComparator orderByComparator) throws SystemException {
		return getPersistence()
				   .findWithDynamicQuery(dynamicQuery, start, end,
			orderByComparator);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
	 */
	public static NewsEntry remove(NewsEntry newsEntry)
		throws SystemException {
		return getPersistence().remove(newsEntry);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
	 */
	public static NewsEntry update(NewsEntry newsEntry, boolean merge)
		throws SystemException {
		return getPersistence().update(newsEntry, merge);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
	 */
	public static NewsEntry update(NewsEntry newsEntry, boolean merge,
		ServiceContext serviceContext) throws SystemException {
		return getPersistence().update(newsEntry, merge, serviceContext);
	}

	/**
	* Caches the news entry in the entity cache if it is enabled.
	*
	* @param newsEntry the news entry to cache
	*/
	public static void cacheResult(
		fr.smile.liferay.portlet.news.model.NewsEntry newsEntry) {
		getPersistence().cacheResult(newsEntry);
	}

	/**
	* Caches the news entries in the entity cache if it is enabled.
	*
	* @param newsEntries the news entries to cache
	*/
	public static void cacheResult(
		java.util.List<fr.smile.liferay.portlet.news.model.NewsEntry> newsEntries) {
		getPersistence().cacheResult(newsEntries);
	}

	/**
	* Creates a new news entry with the primary key. Does not add the news entry to the database.
	*
	* @param entryId the primary key for the new news entry
	* @return the new news entry
	*/
	public static fr.smile.liferay.portlet.news.model.NewsEntry create(
		long entryId) {
		return getPersistence().create(entryId);
	}

	/**
	* Removes the news entry with the primary key from the database. Also notifies the appropriate model listeners.
	*
	* @param entryId the primary key of the news entry to remove
	* @return the news entry that was removed
	* @throws fr.smile.liferay.portlet.news.NoSuchEntryException if a news entry with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static fr.smile.liferay.portlet.news.model.NewsEntry remove(
		long entryId)
		throws com.liferay.portal.kernel.exception.SystemException,
			fr.smile.liferay.portlet.news.NoSuchEntryException {
		return getPersistence().remove(entryId);
	}

	public static fr.smile.liferay.portlet.news.model.NewsEntry updateImpl(
		fr.smile.liferay.portlet.news.model.NewsEntry newsEntry, boolean merge)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().updateImpl(newsEntry, merge);
	}

	/**
	* Finds the news entry with the primary key or throws a {@link fr.smile.liferay.portlet.news.NoSuchEntryException} if it could not be found.
	*
	* @param entryId the primary key of the news entry to find
	* @return the news entry
	* @throws fr.smile.liferay.portlet.news.NoSuchEntryException if a news entry with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static fr.smile.liferay.portlet.news.model.NewsEntry findByPrimaryKey(
		long entryId)
		throws com.liferay.portal.kernel.exception.SystemException,
			fr.smile.liferay.portlet.news.NoSuchEntryException {
		return getPersistence().findByPrimaryKey(entryId);
	}

	/**
	* Finds the news entry with the primary key or returns <code>null</code> if it could not be found.
	*
	* @param entryId the primary key of the news entry to find
	* @return the news entry, or <code>null</code> if a news entry with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static fr.smile.liferay.portlet.news.model.NewsEntry fetchByPrimaryKey(
		long entryId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().fetchByPrimaryKey(entryId);
	}

	/**
	* Finds all the news entries where uuid = &#63;.
	*
	* @param uuid the uuid to search with
	* @return the matching news entries
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<fr.smile.liferay.portlet.news.model.NewsEntry> findByUuid(
		java.lang.String uuid)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByUuid(uuid);
	}

	/**
	* Finds a range of all the news entries where uuid = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param uuid the uuid to search with
	* @param start the lower bound of the range of news entries to return
	* @param end the upper bound of the range of news entries to return (not inclusive)
	* @return the range of matching news entries
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<fr.smile.liferay.portlet.news.model.NewsEntry> findByUuid(
		java.lang.String uuid, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByUuid(uuid, start, end);
	}

	/**
	* Finds an ordered range of all the news entries where uuid = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param uuid the uuid to search with
	* @param start the lower bound of the range of news entries to return
	* @param end the upper bound of the range of news entries to return (not inclusive)
	* @param orderByComparator the comparator to order the results by
	* @return the ordered range of matching news entries
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<fr.smile.liferay.portlet.news.model.NewsEntry> findByUuid(
		java.lang.String uuid, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByUuid(uuid, start, end, orderByComparator);
	}

	/**
	* Finds the first news entry in the ordered set where uuid = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param uuid the uuid to search with
	* @param orderByComparator the comparator to order the set by
	* @return the first matching news entry
	* @throws fr.smile.liferay.portlet.news.NoSuchEntryException if a matching news entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static fr.smile.liferay.portlet.news.model.NewsEntry findByUuid_First(
		java.lang.String uuid,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			fr.smile.liferay.portlet.news.NoSuchEntryException {
		return getPersistence().findByUuid_First(uuid, orderByComparator);
	}

	/**
	* Finds the last news entry in the ordered set where uuid = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param uuid the uuid to search with
	* @param orderByComparator the comparator to order the set by
	* @return the last matching news entry
	* @throws fr.smile.liferay.portlet.news.NoSuchEntryException if a matching news entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static fr.smile.liferay.portlet.news.model.NewsEntry findByUuid_Last(
		java.lang.String uuid,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			fr.smile.liferay.portlet.news.NoSuchEntryException {
		return getPersistence().findByUuid_Last(uuid, orderByComparator);
	}

	/**
	* Finds the news entries before and after the current news entry in the ordered set where uuid = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param entryId the primary key of the current news entry
	* @param uuid the uuid to search with
	* @param orderByComparator the comparator to order the set by
	* @return the previous, current, and next news entry
	* @throws fr.smile.liferay.portlet.news.NoSuchEntryException if a news entry with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static fr.smile.liferay.portlet.news.model.NewsEntry[] findByUuid_PrevAndNext(
		long entryId, java.lang.String uuid,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			fr.smile.liferay.portlet.news.NoSuchEntryException {
		return getPersistence()
				   .findByUuid_PrevAndNext(entryId, uuid, orderByComparator);
	}

	/**
	* Filters by the user's permissions and finds all the news entries where uuid = &#63;.
	*
	* @param uuid the uuid to search with
	* @return the matching news entries that the user has permission to view
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<fr.smile.liferay.portlet.news.model.NewsEntry> filterFindByUuid(
		java.lang.String uuid)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().filterFindByUuid(uuid);
	}

	/**
	* Filters by the user's permissions and finds a range of all the news entries where uuid = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param uuid the uuid to search with
	* @param start the lower bound of the range of news entries to return
	* @param end the upper bound of the range of news entries to return (not inclusive)
	* @return the range of matching news entries that the user has permission to view
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<fr.smile.liferay.portlet.news.model.NewsEntry> filterFindByUuid(
		java.lang.String uuid, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().filterFindByUuid(uuid, start, end);
	}

	/**
	* Filters by the user's permissions and finds an ordered range of all the news entries where uuid = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param uuid the uuid to search with
	* @param start the lower bound of the range of news entries to return
	* @param end the upper bound of the range of news entries to return (not inclusive)
	* @param orderByComparator the comparator to order the results by
	* @return the ordered range of matching news entries that the user has permission to view
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<fr.smile.liferay.portlet.news.model.NewsEntry> filterFindByUuid(
		java.lang.String uuid, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .filterFindByUuid(uuid, start, end, orderByComparator);
	}

	/**
	* Finds all the news entries where userId = &#63;.
	*
	* @param userId the user id to search with
	* @return the matching news entries
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<fr.smile.liferay.portlet.news.model.NewsEntry> findByUserId(
		long userId) throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByUserId(userId);
	}

	/**
	* Finds a range of all the news entries where userId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param userId the user id to search with
	* @param start the lower bound of the range of news entries to return
	* @param end the upper bound of the range of news entries to return (not inclusive)
	* @return the range of matching news entries
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<fr.smile.liferay.portlet.news.model.NewsEntry> findByUserId(
		long userId, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByUserId(userId, start, end);
	}

	/**
	* Finds an ordered range of all the news entries where userId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param userId the user id to search with
	* @param start the lower bound of the range of news entries to return
	* @param end the upper bound of the range of news entries to return (not inclusive)
	* @param orderByComparator the comparator to order the results by
	* @return the ordered range of matching news entries
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<fr.smile.liferay.portlet.news.model.NewsEntry> findByUserId(
		long userId, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByUserId(userId, start, end, orderByComparator);
	}

	/**
	* Finds the first news entry in the ordered set where userId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param userId the user id to search with
	* @param orderByComparator the comparator to order the set by
	* @return the first matching news entry
	* @throws fr.smile.liferay.portlet.news.NoSuchEntryException if a matching news entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static fr.smile.liferay.portlet.news.model.NewsEntry findByUserId_First(
		long userId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			fr.smile.liferay.portlet.news.NoSuchEntryException {
		return getPersistence().findByUserId_First(userId, orderByComparator);
	}

	/**
	* Finds the last news entry in the ordered set where userId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param userId the user id to search with
	* @param orderByComparator the comparator to order the set by
	* @return the last matching news entry
	* @throws fr.smile.liferay.portlet.news.NoSuchEntryException if a matching news entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static fr.smile.liferay.portlet.news.model.NewsEntry findByUserId_Last(
		long userId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			fr.smile.liferay.portlet.news.NoSuchEntryException {
		return getPersistence().findByUserId_Last(userId, orderByComparator);
	}

	/**
	* Finds the news entries before and after the current news entry in the ordered set where userId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param entryId the primary key of the current news entry
	* @param userId the user id to search with
	* @param orderByComparator the comparator to order the set by
	* @return the previous, current, and next news entry
	* @throws fr.smile.liferay.portlet.news.NoSuchEntryException if a news entry with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static fr.smile.liferay.portlet.news.model.NewsEntry[] findByUserId_PrevAndNext(
		long entryId, long userId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			fr.smile.liferay.portlet.news.NoSuchEntryException {
		return getPersistence()
				   .findByUserId_PrevAndNext(entryId, userId, orderByComparator);
	}

	/**
	* Filters by the user's permissions and finds all the news entries where userId = &#63;.
	*
	* @param userId the user id to search with
	* @return the matching news entries that the user has permission to view
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<fr.smile.liferay.portlet.news.model.NewsEntry> filterFindByUserId(
		long userId) throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().filterFindByUserId(userId);
	}

	/**
	* Filters by the user's permissions and finds a range of all the news entries where userId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param userId the user id to search with
	* @param start the lower bound of the range of news entries to return
	* @param end the upper bound of the range of news entries to return (not inclusive)
	* @return the range of matching news entries that the user has permission to view
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<fr.smile.liferay.portlet.news.model.NewsEntry> filterFindByUserId(
		long userId, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().filterFindByUserId(userId, start, end);
	}

	/**
	* Filters by the user's permissions and finds an ordered range of all the news entries where userId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param userId the user id to search with
	* @param start the lower bound of the range of news entries to return
	* @param end the upper bound of the range of news entries to return (not inclusive)
	* @param orderByComparator the comparator to order the results by
	* @return the ordered range of matching news entries that the user has permission to view
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<fr.smile.liferay.portlet.news.model.NewsEntry> filterFindByUserId(
		long userId, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .filterFindByUserId(userId, start, end, orderByComparator);
	}

	/**
	* Finds all the news entries where classNameId = &#63; and classPK = &#63;.
	*
	* @param classNameId the class name id to search with
	* @param classPK the class p k to search with
	* @return the matching news entries
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<fr.smile.liferay.portlet.news.model.NewsEntry> findByC_C(
		long classNameId, long classPK)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByC_C(classNameId, classPK);
	}

	/**
	* Finds a range of all the news entries where classNameId = &#63; and classPK = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param classNameId the class name id to search with
	* @param classPK the class p k to search with
	* @param start the lower bound of the range of news entries to return
	* @param end the upper bound of the range of news entries to return (not inclusive)
	* @return the range of matching news entries
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<fr.smile.liferay.portlet.news.model.NewsEntry> findByC_C(
		long classNameId, long classPK, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByC_C(classNameId, classPK, start, end);
	}

	/**
	* Finds an ordered range of all the news entries where classNameId = &#63; and classPK = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param classNameId the class name id to search with
	* @param classPK the class p k to search with
	* @param start the lower bound of the range of news entries to return
	* @param end the upper bound of the range of news entries to return (not inclusive)
	* @param orderByComparator the comparator to order the results by
	* @return the ordered range of matching news entries
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<fr.smile.liferay.portlet.news.model.NewsEntry> findByC_C(
		long classNameId, long classPK, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByC_C(classNameId, classPK, start, end,
			orderByComparator);
	}

	/**
	* Finds the first news entry in the ordered set where classNameId = &#63; and classPK = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param classNameId the class name id to search with
	* @param classPK the class p k to search with
	* @param orderByComparator the comparator to order the set by
	* @return the first matching news entry
	* @throws fr.smile.liferay.portlet.news.NoSuchEntryException if a matching news entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static fr.smile.liferay.portlet.news.model.NewsEntry findByC_C_First(
		long classNameId, long classPK,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			fr.smile.liferay.portlet.news.NoSuchEntryException {
		return getPersistence()
				   .findByC_C_First(classNameId, classPK, orderByComparator);
	}

	/**
	* Finds the last news entry in the ordered set where classNameId = &#63; and classPK = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param classNameId the class name id to search with
	* @param classPK the class p k to search with
	* @param orderByComparator the comparator to order the set by
	* @return the last matching news entry
	* @throws fr.smile.liferay.portlet.news.NoSuchEntryException if a matching news entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static fr.smile.liferay.portlet.news.model.NewsEntry findByC_C_Last(
		long classNameId, long classPK,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			fr.smile.liferay.portlet.news.NoSuchEntryException {
		return getPersistence()
				   .findByC_C_Last(classNameId, classPK, orderByComparator);
	}

	/**
	* Finds the news entries before and after the current news entry in the ordered set where classNameId = &#63; and classPK = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param entryId the primary key of the current news entry
	* @param classNameId the class name id to search with
	* @param classPK the class p k to search with
	* @param orderByComparator the comparator to order the set by
	* @return the previous, current, and next news entry
	* @throws fr.smile.liferay.portlet.news.NoSuchEntryException if a news entry with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static fr.smile.liferay.portlet.news.model.NewsEntry[] findByC_C_PrevAndNext(
		long entryId, long classNameId, long classPK,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			fr.smile.liferay.portlet.news.NoSuchEntryException {
		return getPersistence()
				   .findByC_C_PrevAndNext(entryId, classNameId, classPK,
			orderByComparator);
	}

	/**
	* Filters by the user's permissions and finds all the news entries where classNameId = &#63; and classPK = &#63;.
	*
	* @param classNameId the class name id to search with
	* @param classPK the class p k to search with
	* @return the matching news entries that the user has permission to view
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<fr.smile.liferay.portlet.news.model.NewsEntry> filterFindByC_C(
		long classNameId, long classPK)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().filterFindByC_C(classNameId, classPK);
	}

	/**
	* Filters by the user's permissions and finds a range of all the news entries where classNameId = &#63; and classPK = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param classNameId the class name id to search with
	* @param classPK the class p k to search with
	* @param start the lower bound of the range of news entries to return
	* @param end the upper bound of the range of news entries to return (not inclusive)
	* @return the range of matching news entries that the user has permission to view
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<fr.smile.liferay.portlet.news.model.NewsEntry> filterFindByC_C(
		long classNameId, long classPK, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().filterFindByC_C(classNameId, classPK, start, end);
	}

	/**
	* Filters by the user's permissions and finds an ordered range of all the news entries where classNameId = &#63; and classPK = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param classNameId the class name id to search with
	* @param classPK the class p k to search with
	* @param start the lower bound of the range of news entries to return
	* @param end the upper bound of the range of news entries to return (not inclusive)
	* @param orderByComparator the comparator to order the results by
	* @return the ordered range of matching news entries that the user has permission to view
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<fr.smile.liferay.portlet.news.model.NewsEntry> filterFindByC_C(
		long classNameId, long classPK, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .filterFindByC_C(classNameId, classPK, start, end,
			orderByComparator);
	}

	/**
	* Finds all the news entries.
	*
	* @return the news entries
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<fr.smile.liferay.portlet.news.model.NewsEntry> findAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll();
	}

	/**
	* Finds a range of all the news entries.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of news entries to return
	* @param end the upper bound of the range of news entries to return (not inclusive)
	* @return the range of news entries
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<fr.smile.liferay.portlet.news.model.NewsEntry> findAll(
		int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll(start, end);
	}

	/**
	* Finds an ordered range of all the news entries.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of news entries to return
	* @param end the upper bound of the range of news entries to return (not inclusive)
	* @param orderByComparator the comparator to order the results by
	* @return the ordered range of news entries
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<fr.smile.liferay.portlet.news.model.NewsEntry> findAll(
		int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll(start, end, orderByComparator);
	}

	/**
	* Removes all the news entries where uuid = &#63; from the database.
	*
	* @param uuid the uuid to search with
	* @throws SystemException if a system exception occurred
	*/
	public static void removeByUuid(java.lang.String uuid)
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence().removeByUuid(uuid);
	}

	/**
	* Removes all the news entries where userId = &#63; from the database.
	*
	* @param userId the user id to search with
	* @throws SystemException if a system exception occurred
	*/
	public static void removeByUserId(long userId)
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence().removeByUserId(userId);
	}

	/**
	* Removes all the news entries where classNameId = &#63; and classPK = &#63; from the database.
	*
	* @param classNameId the class name id to search with
	* @param classPK the class p k to search with
	* @throws SystemException if a system exception occurred
	*/
	public static void removeByC_C(long classNameId, long classPK)
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence().removeByC_C(classNameId, classPK);
	}

	/**
	* Removes all the news entries from the database.
	*
	* @throws SystemException if a system exception occurred
	*/
	public static void removeAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence().removeAll();
	}

	/**
	* Counts all the news entries where uuid = &#63;.
	*
	* @param uuid the uuid to search with
	* @return the number of matching news entries
	* @throws SystemException if a system exception occurred
	*/
	public static int countByUuid(java.lang.String uuid)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countByUuid(uuid);
	}

	/**
	* Filters by the user's permissions and counts all the news entries where uuid = &#63;.
	*
	* @param uuid the uuid to search with
	* @return the number of matching news entries that the user has permission to view
	* @throws SystemException if a system exception occurred
	*/
	public static int filterCountByUuid(java.lang.String uuid)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().filterCountByUuid(uuid);
	}

	/**
	* Counts all the news entries where userId = &#63;.
	*
	* @param userId the user id to search with
	* @return the number of matching news entries
	* @throws SystemException if a system exception occurred
	*/
	public static int countByUserId(long userId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countByUserId(userId);
	}

	/**
	* Filters by the user's permissions and counts all the news entries where userId = &#63;.
	*
	* @param userId the user id to search with
	* @return the number of matching news entries that the user has permission to view
	* @throws SystemException if a system exception occurred
	*/
	public static int filterCountByUserId(long userId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().filterCountByUserId(userId);
	}

	/**
	* Counts all the news entries where classNameId = &#63; and classPK = &#63;.
	*
	* @param classNameId the class name id to search with
	* @param classPK the class p k to search with
	* @return the number of matching news entries
	* @throws SystemException if a system exception occurred
	*/
	public static int countByC_C(long classNameId, long classPK)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countByC_C(classNameId, classPK);
	}

	/**
	* Filters by the user's permissions and counts all the news entries where classNameId = &#63; and classPK = &#63;.
	*
	* @param classNameId the class name id to search with
	* @param classPK the class p k to search with
	* @return the number of matching news entries that the user has permission to view
	* @throws SystemException if a system exception occurred
	*/
	public static int filterCountByC_C(long classNameId, long classPK)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().filterCountByC_C(classNameId, classPK);
	}

	/**
	* Counts all the news entries.
	*
	* @return the number of news entries
	* @throws SystemException if a system exception occurred
	*/
	public static int countAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countAll();
	}

	public static NewsEntryPersistence getPersistence() {
		if (_persistence == null) {
			_persistence = (NewsEntryPersistence)PortletBeanLocatorUtil.locate(fr.smile.liferay.portlet.news.service.ClpSerializer.SERVLET_CONTEXT_NAME,
					NewsEntryPersistence.class.getName());
		}

		return _persistence;
	}

	public void setPersistence(NewsEntryPersistence persistence) {
		_persistence = persistence;
	}

	private static NewsEntryPersistence _persistence;
}